package com.hejielife.immutable1;

/**
 * 2019年8月2日 上午10:45:46
 * 
 * @author hejielife
 * @despribe 不可变模式，变量没有set方法,final修饰
 */
public final class Person {
	private final String name;
	private final String address;

	public Person(String name, String address) {
		this.name = name;
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public String getAddress() {
		return address;
	}

	public String toString() {
		return "[ Person: name = " + name + ", address = " + address + " ]";
	}
}
